const multer = require('multer');
const path = require("node:path");


const storage = multer.diskStorage({
    destination: './public/gpfp',
    filename: function (req, file, cb) {
        cb(null, file.fieldname + '-' + Date.now() + path.extname(file.originalname));
    },
});

const uploadGroupPic = multer({
    storage: storage
});

module.exports = uploadGroupPic;